import { BasicFetchResult } from '../model/baseModel';
import { defHttp } from '@/utils/http/axios';
const api = '/sysNotice';
/**
 * 查询通知表分页
 * @author frank
 * @date 2023-05-30 17:50:54
 */
export const page = (params?: any) =>
  defHttp.get<BasicFetchResult<any>>({ url: api + '/page', params });
/**
 * 添加通知表
 * @author frank
 * @date 2023-05-30 17:50:54
 */
export const add = (params?: any) =>
  defHttp.post({ url: api + '/add', params });
/**
 * 修改通知表
 * @author frank
 * @date 2023-05-30 17:50:54
 */
export const edit = (params?: any) =>
  defHttp.post({ url: api + '/edit', params });
/**
 * 删除通知表
 * @author frank
 * @date 2023-05-30 17:50:54
 */
export const del = (ids: string[]) =>
  defHttp.post({ url: api + '/delete', params: ids });

export const myMsg = (params: any) =>
  defHttp.get({ url: api + '/myMsg', params });

export const publish = (id: string) =>
  defHttp.post({ url: `${api}/publish/${id}` });
export const read = (id: string) => defHttp.post({ url: `${api}/read/${id}` });